package com.qdxwx.common.config;

import com.qdxwx.common.utils.PropertyUtils;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

/**
 * Qdx NetSchool Platform
 * @author ZhiYong
 * @updateTime 2022/5/25
 * @description
 */
@Configuration
public class UploadConfig {

    private static final Properties propertyUtils = PropertyUtils.getInstance("upload.properties");
    //保存文件本地路径
    public static final String uploadRoot = propertyUtils.getProperty("upload.root");
    //访问根目录
    public static final String uploadFolder = propertyUtils.getProperty("upload.folder");
    //临时文件夹
    public static final String uploadTempFolder = propertyUtils.getProperty("upload.tempFolder");
    //允许上传图片类型
    public static final String uploadImageType = propertyUtils.getProperty("upload.imageType");
    //允许上传文件类型
    public static final String uploadFileType = propertyUtils.getProperty("upload.fileType");
    //允许上传音频类型
    public static final String uploadAudioType = propertyUtils.getProperty("upload.audioType");
    //允许上传视频类型
    public static final String uploadVideoType = propertyUtils.getProperty("upload.videoType");
    //图片
    public static final String uploadImageFolder = uploadFolder + "/images";
    //预览图
    public static final String uploadPreviewFolder = uploadFolder + "/previews";
    //文件
    public static final String uploadFileFolder = uploadFolder + "/files";
    //音频
    public static final String uploadAudioFolder = uploadFolder + "/audios";
    //视频
    public static final String uploadVideoFolder = uploadFolder + "/videos";
    //封面
    public static final String uploadCoverFolder = uploadFolder + "/covers";
    //头像
    public static final String uploadAvatarFolder = uploadFolder + "/avatars";
    //缩略图
    public static final String uploadCoverThumb = uploadFolder + "/thumbs";
    //证书
    public static final String uploadCertFolder = uploadFolder + "/certs";
    //广告
    public static final String uploadAdvertFolder = uploadFolder + "/adverts";
    //专集
    public static final String uploadAlbumFolder = uploadFolder + "/album";
}
